package com.cloud.mqtt;

import org.springframework.stereotype.Component;

import java.lang.annotation.*;

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Component
public @interface QTConsumer {

    /**
     * 订阅消息主题
     *
     * @return
     */
    String topic();

    /**
     * 订阅消息级别
     *
     * @return
     */
    int qos() default QTLevel.QOS_1;

    /**
     * 订阅消息模式,默认普通订阅
     *
     * @return
     */
    String mode() default QTMode.NONE;

    /**
     * 消息订阅组
     *
     * @return
     */
    String group() default QTMode.NONE;

}
